<fieldset>
	<legend>AJOUT D'ACTUALITÉS</legend>
		<form class="formGestion" action="admin/actus/ajoutActus.php" method="post">
			<table>
				<tr>
					<td>
						<label for="titre">Titre</label>
						<input maxlength="75" required id="titre" name="titre" type="text" placeholder="titre de l'actualité"/>
					</td>
					<td>
						<label for="description">Description</label>
						<input maxlength="150" required id="description" name="description" type="text" placeholder="description de l'actualité"/>
					</td>
					<td>
						<label for="nomImage">Image</label>
						
						<select onChange="return imgChange();" id="nomImage" name="nomImage">
							<option value="aucune" selected>aucune</option>
							<?php 
							require_once ('../../connexion.php');
							try{
								$sql='SELECT * FROM images';
								$select = $connection->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
								$select->execute();					
								while($enregistrement = $select->fetch(PDO::FETCH_OBJ)){
								?>
									<option value="<?php echo $enregistrement->id;?>"><?php echo $enregistrement->nom;?></option>
									
								<?php
								}
							}catch(Exception $e){
								echo "<h3 class='error'>Impossible de charger les images</h3>";
							}
							?>
						</select>
					</td>				
				</tr>
				<tr>
					<td colspan="2">
						<label for="contenu">Contenu</label>
						<textarea required cols="100" rows="25" id="contenu" name="contenu" placeholder="contenu de l'actualité"></textarea>
					</td>
					<td class="contentBigImg"><img id="imgBIG" src="../images/none.png"/></td>
				</tr>
				<tr>
					<td class="center" colspan="3">
						<input class="inputAction" type="submit" value="Sauvegarder"/>
						<input class="inputAction" id="btnResetAdd" type="reset"/>
					</td>	
				</tr>
			</table>
		</form>
</fieldset>


											